package com.abhinav.designPatterns.command;

import java.util.LinkedList;
import java.util.Queue;

// Invoker
public class Agent {
	private LinkedList ordersQueue = new LinkedList();
	
	public void placeOrder(Order order){
		ordersQueue.addLast(order);
        order = (Order) ordersQueue.removeFirst();
		order.execute();
	}
}
